package com.cosina.game.crystallight.model.battle;

import com.cosina.game.crystallight.engine.BattleEngine;



public abstract class Ability{
	public static final int TOWER =  121;
	public static final int PUDDLE = 122;
	public static final int VORTEX = 123;
	public static final int MINE =  124;
	public static final int SPEED = 125;
	public static final int RANGE = 126;
	
	public static final int ACCERLATION =  131;
	public static final int GENM = 141;
	public static final int MIXTURE = 151;

	public abstract int needMana();
	public abstract int getId();
	
	protected boolean canActive= false;
	
	public boolean canActive(){
		return needMana() <= BattleEngine.manaFlask.getCurrent();
	}
	
	public final int getIndex(){
		int temp = getId()%10;
		if(temp>=4){
			return temp - 4;
		}else{
			return temp - 1;
		}
	}
	
	public int getFrameId(){
		return getId();
	}
	
	public abstract void doHandler();
}

